#define  _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <list>
using namespace std;

void test_list1()
{
	list<int> lt1 = { 1,2,3,4 };
	list<int>::iterator it = lt1.begin();
	while (it != lt1.end())
	{
		cout << *it << " ";
		it++;
	}
	cout << endl;
}

void test_list2()
{
	list<int> lt2 = { 8,2,7,4,3,5,1,6 };
	lt2.sort();
	list<int>::iterator it = lt2.begin();
	while (it != lt2.end())
	{
		cout << *it << " ";
		it++;
	}
	cout << endl;
}

void test_list3()
{
	list<int> lt3 = { 8,2,7,4,3,5,1,6 ,8,8,2 };
	lt3.sort();
	lt3.unique();
	list<int>::iterator it = lt3.begin();
	while (it != lt3.end())
	{
		cout << *it << " ";
		it++;
	}
	cout << endl;
}

int main()
{
	test_list3();
	return 0;
}